﻿//----------------------------------------------------------------------------
// <copyright file="RulesException.cs" company="Solidsoft Ltd">
//      (c) Solidsoft Ltd
// </copyright>
// <summary>This file contains the RulesException interface.</summary>
//----------------------------------------------------------------------------

namespace Tulip.Rules
{
    using System;
    using System.Runtime.Serialization;

    /// <summary>
    /// Represents and exception raised by Tulip Rules.
    /// </summary>
    [Serializable]
    public class RulesException : Exception
    {
        /// <summary>
        /// Initializes a new instance of the RulesException class.
        /// </summary>
        public RulesException()
        {
        }

        /// <summary>
        /// Initializes a new instance of the RulesException class.
        /// </summary>
        /// <param name="message">Error message.</param>
        public RulesException(string message)
            : base(message)
        {
        }

        /// <summary>
        /// Initializes a new instance of the RulesException class.
        /// </summary>
        /// <param name="message">Error message.</param>
        /// <param name="innerException">Inner exception wrapped by RuleServiceException.</param>
        public RulesException(string message, Exception innerException)
            : base(message, innerException)
        {
        }

        /// <summary>
        /// Initializes a new instance of the RulesException class.
        /// </summary>
        /// <param name="info">Serialization information.</param>
        /// <param name="context">Streaming context.</param>
        protected RulesException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }
    }
}
